#include "glare.d3d11.ShaderFactory.h"
#include "glare.d3d11.VertexShader.h"
#include "glare.d3d11.Driver.h"
#include "glare.d3d11.PixelShader.h"
#include "glare.d3d11.ShaderInputDeclaration.h"

namespace Glare {

	D3D11ShaderFactory::D3D11ShaderFactory(D3D11Driver* driver) 
		: _driver(driver)
	{

	}

	VertexShader* D3D11ShaderFactory::CreateVertexShader()
	{
		return new D3D11VertexShader(static_cast<D3D11Driver*>(GetDriver()));
	}

	PixelShader* D3D11ShaderFactory::CreatePixelShader()
	{
		return new D3D11PixelShader(static_cast<D3D11Driver*>(GetDriver()));
	}

	void D3D11ShaderFactory::DestroyShader(Shader* shader)
	{
		delete shader;
	}

	Driver* D3D11ShaderFactory::GetDriver() const
	{
		return _driver;
	}

	ShaderInputDeclaration* D3D11ShaderFactory::CreateInputDeclaration()
	{
		return new D3D11ShaderInputDeclaration(_driver);
	}

	void D3D11ShaderFactory::DestroyInputDeclaration(ShaderInputDeclaration* declaration)
	{
		delete declaration;
	}

}
